<template>
     <v-container class="fill-height">
       <div class="flex mt-4 mb-3">
         <v-icon color="#fff">mdi-heart</v-icon>
         <div class="text-left text-white ml-1">
           最近流行
         </div>
       </div>
       <v-divider color="#fff" :thickness="2"></v-divider>
       <v-row dense class="mt-4">
         <v-col
           v-for="item in list"
           :key="item.title"
           :cols="4"
         >
         <v-card
           class="mx-auto"
           color="#212121"
           @click="sheet = true, currentItem = item"
         >
           <v-responsive>
             <v-card
               class="mx-auto"
               elevation="24"
             >
               <v-carousel
                 show-arrows="hover"
                 cycle
                 hide-delimiter-background
               >
                 <v-carousel-item
                   v-for="(slide, i) in item.imgs"
                   :key="i"
                   :src="slide"
                   cover
                 >
                 </v-carousel-item>
               </v-carousel>
             </v-card>
           </v-responsive>
           <v-card-title class="text-white">
             {{ item.title }}
           </v-card-title>
           <v-card-subtitle class="text-white">
             {{ item.tag }}
           </v-card-subtitle>
           <v-card-actions>
             <div class="text-xs text-gray-500">
               {{ item.desc }}
             </div>
           </v-card-actions>
         </v-card>
         </v-col>
       </v-row>
       <div class="flex mt-4 mb-3">
         <v-icon color="#fff">mdi-movie-open-play</v-icon>
         <div class="text-left text-white ml-1">
           精品短剧
         </div>
       </div>
       <v-divider color="#fff" :thickness="2"></v-divider>
       <v-row dense class="mt-4">
         <v-col
           v-for="item in listAll"
           :key="item.title"
           :cols="4"
         >
           <v-card
             class="mx-auto"
             color="#212121"
           >
             <v-responsive>
               <v-card
                 class="mx-auto"
                 elevation="24"
               >
                 <v-carousel
                   show-arrows="hover"
                   cycle
                   hide-delimiter-background
                 >
                   <v-carousel-item
                     v-for="(slide, i) in item.imgs"
                     :key="i"
                     :src="slide"
                     cover
                   >
                   </v-carousel-item>
                 </v-carousel>
               </v-card>
             </v-responsive>
             <v-card-title class="text-white">
               {{ item.title }}
             </v-card-title>
             <v-card-subtitle class="text-white">
               <v-chip  variant="flat" size="small">
                 {{ item.tag }}
               </v-chip>
               <div style="height: 10px"></div>
               <span class="text-sm">{{ item.link }}</span>
               <span class="ml-1 mr-1 cursor-pointer" @click="copyUrl(item)">复制</span>
               <span class="cursor-pointer" @click="openUrl(item)">直接打开</span>
             </v-card-subtitle>
             <v-card-actions>
               <div class="text-xs text-gray-500">
                 {{ item.desc }}
               </div>
             </v-card-actions>
           </v-card>
         </v-col>
       </v-row>
     </v-container>
</template>

<script setup>

import App from "@/App.vue";
import {ref} from "vue";
const sheet = ref(false);
const currentItem = ref({});

const colors = [
  'warning',
  'pink darken-2',
  'red lighten-1',
  'deep-purple accent-4',
];
 const slides = [
  '斗罗大陆',
  '神印王座',
  '吞噬星空',
  '斗破苍穹',
];

 const list = [
   {
     title:"极寒九十九",
     show:false,
     tag:"S 男频 都市末日",
     link: "http://s.jinli.co/a.ZxlkRXZL",
     imgs:["https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/极寒九十九/微信图片_20240402183429.jpg","https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/极寒九十九/00封面.jpg"],
      desc:"全球冰封末日降临，舔狗张奕为救女神雨晴被杀，舔到最后连命都没有，重活一世，我要看着上辈子掠夺我资源的人一个个死去，而我将是末世唯一活下来的人类！"
   },
   {
     title:"末日游戏",
     show:false,
     tag:"复仇 末日 重生",
     link:"http://s.jinli.co/f.XjqM6Xrl",
     imgs:["https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/末日游戏/微信图片_20240402083033.jpg","https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/末日游戏/微信图片_20240402083033_副本.jpg"],
     desc:"前世，主人公赵宇在末世来临时依旧选择善待别人，但他的善意却被以贺向明为主的恶人利用而最终导致自己和好友身死。临死前，赵宇意外地重生到了末世来临的一天前并保留了之前的记忆，重生后，为了在末世中生存下去，赵宇利用参加游戏活动对包括贺向明在内的恶人们的复仇。"
   },{
     title: "神湮",
     show:false,
     tag:"S 男频 都市战神",
     link:"http://s.jinli.co/b.6klxDKD4",
     imgs:["https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/神湮/微信图片_20240402183918.jpg","https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/神湮/微信图片_20240402183918_副本.jpg"],
     desc:"男子发现妻子出轨外国人18年，三个孩子竟然都不是自己的。女儿又在宴会上死亡、父亲被人杀死！他霸气为父亲和女儿复仇，杀伐果断！"

   }
 ]

const listAll = [
  {
    title:"古今横跳戏诸侯",
    show:false,
    tag:"A 男频 古装穿越",
    link: "http://s.jinli.co/b.l0AOvQrz",
    imgs:["https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/古今横跳戏诸侯/微信图片_20240402193431.jpg","https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/古今横跳戏诸侯/微信图片_20240402193431_副本.jpg"],
    desc:"男主因脖子上的传家宝玉佩引发的时空裂缝，让他可以在现代和古代之间来回穿梭，将古代的宝物带到现代，实现发家致富！！"
  },
  {
    title:"末日游戏",
    show:false,
    tag:"复仇 末日 重生",
    link:"http://s.jinli.co/f.XjqM6Xrl",
    imgs:["https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/末日游戏/微信图片_20240402083033.jpg","https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/末日游戏/微信图片_20240402083033_副本.jpg"],
    desc:"前世，主人公赵宇在末世来临时依旧选择善待别人，但他的善意却被以贺向明为主的恶人利用而最终导致自己和好友身死。临死前，赵宇意外地重生到了末世来临的一天前并保留了之前的记忆，重生后，为了在末世中生存下去，赵宇利用参加游戏活动对包括贺向明在内的恶人们的复仇。"
  },
  {
    title: "娇娇王妃她脸红心跳",
    show: false,
    tag:"穿越 古装 王妃",
    link: "http://s.jinli.co/h.ZoWq5vXG",
    imgs: ["https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/娇娇王妃她脸红心跳/微信图片_20240407090752.jpg","https://mp-a068dee3-7cc2-4a19-85d2-9834f842dfaa.cdn.bspapp.com/娇娇王妃她脸红心跳/微信图片_20240407090752_副本.jpg"],
    desc: "水洛蓝因医学实验失败后机缘巧合穿越回古代成为钰王府的王妃，冷钰遭人陷害瘫痪在床三年也人之将死，在水洛兰的治愈和陪伴下，两人互生情愫，并将王爷多年腿疾治好，两人也找到当年的真相，洗清冤屈，报仇雪恨。"
  }

]

function copyUrl(item){
navigator.clipboard.writeText(item.link).then(()=>{
  alert("复制成功！")
}).catch(()=>{
  alert("复制失败！")
})
}
function openUrl(item){
  window.location.href = item.link;
}

</script>

<style>

  .css-play{
    visibility: hidden;
    width: 60px;
    height: 60px;
    margin-left: calc(50% - 30px);
    z-index: 999;
    color: rgba(0,0,0,0);
  }
  .css-cover{
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
    width: 100%;
    height: 100%;
    z-index: 99;
  }

</style>
